package shujvjiegou.week3;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class ArrayMove {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int temp;
        String[] str = scan.nextLine().split(",");
        List<Integer> odd = new ArrayList<>();
        List<Integer> even = new ArrayList<>();
        for (int i = 0; i < str.length; i++) {
            temp = Integer.parseInt(str[i]);
            if (temp % 2 == 0) {
                odd.add(temp);
            } else {
                even.add(temp);
            }
        }

        if(!even.isEmpty()){
            System.out.print(even.get(0));
            even.remove(even.get(0));
        }else{
            System.out.print(odd.get(0));
            odd.remove(odd.get(0));
        }
        for (var e:even) {
            System.out.print(","+e);
        }
        for (var o:odd) {
            System.out.print(","+o);
        }

    }
}
